using System.ComponentModel;

namespace TunesHelper
{
  public class HotkeyRow : INotifyPropertyChanged
  {
    private bool _isActive;
    public bool IsActive
    {
      get { return _isActive; }
      set
      {
        if (_isActive == value) return;
        _isActive = value;
        OnPropertyChanged("IsActive");
      }
    }

    public iTunesAction Action { get; set; }
    public Hotkey Hotkey { get; set; }
    
    public event PropertyChangedEventHandler PropertyChanged;

    protected virtual void OnPropertyChanged(string propertyName)
    {
      var handler = PropertyChanged;
      if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
    }
  }
}